!function(l,o,e){"use strict";l.fn.scrollUp=function(o){l.data(e.body,"scrollUp")||(l.data(e.body,"scrollUp",!0),l.fn.scrollUp.init(o))},l.fn.scrollUp.init=function(r){var s,t,c,i,n,a,d,p=l.fn.scrollUp.settings=l.extend({},l.fn.scrollUp.defaults,r),f=!1;switch(d=p.scrollTrigger?l(p.scrollTrigger):l("",{id:p.scrollName,class:p.scrollClass,href:"#top"}),p.scrollTitle&&d.attr("title",p.scrollTitle),d.appendTo("body"),p.scrollImg||p.scrollTrigger||d.html(p.scrollText),d.css({display:"none",position:"fixed",zIndex:p.zIndex}),p.activeOverlay&&l("
",{id:p.scrollName+"-active"}).css({position:"absolute",top:p.scrollDistance+"px",width:"100%",borderTop:"1px dotted"+p.activeOverlay,zIndex:p.zIndex}).appendTo("body"),p.animation){case"fade":s="fadeIn",t="fadeOut",c=p.animationSpeed;break;case"slide":s="slideDown",t="slideUp",c=p.animationSpeed;break;default:s="show",t="hide",c=0}i="top"===p.scrollFrom?p.scrollDistance:l(e).height()-l(o).height()-p.scrollDistance,n=l(o).scroll(function(){l(o).scrollTop()>i?f||(d[s](c),f=!0):f&&(d[t](c),f=!1)}),p.scrollTarget?"number"==typeof p.scrollTarget?a=p.scrollTarget:"string"==typeof p.scrollTarget&&(a=Math.floor(l(p.scrollTarget).offset().top)):a=0,d.click(function(o){o.preventDefault(),l("html, body").animate({scrollTop:a},p.scrollSpeed,p.easingType)})},l.fn.scrollUp.defaults={scrollName:"scrollUp",scrollClass:"scrollUp",scrollDistance:300,scrollFrom:"top",scrollSpeed:300,easingType:"linear",animation:"fade",animationSpeed:200,scrollTrigger:!1,scrollTarget:!1,scrollText:"Scroll to top",scrollTitle:!1,scrollImg:!1,activeOverlay:!1,zIndex:2147483647},l.fn.scrollUp.destroy=function(r){l.removeData(e.body,"scrollUp"),l("#"+l.fn.scrollUp.settings.scrollName).remove(),l("#"+l.fn.scrollUp.settings.scrollName+"-active").remove(),l.fn.jquery.split(".")[1]>=7?l(o).off("scroll",r):l(o).unbind("scroll",r)},l.scrollUp=l.fn.scrollUp}(jQuery,window,document);
(function(){
var isIe=/(trident|msie)/i.test(navigator.userAgent);
if(isIe&&document.getElementById&&window.addEventListener){
window.addEventListener('hashchange', function(){
var id=location.hash.substring(1),
element;
if(!(/^[A-z0-9_-]+$/.test(id))){
return;
}
element=document.getElementById(id);
if(element){
if(!(/^(?:a|select|input|button|textarea)$/i.test(element.tagName))){
element.tabIndex=-1;
}
element.focus();
}}, false);
}})();
jQuery(function($){
"use strict";
jQuery('.main-menu-navigation > ul').superfish({
delay: 500,
animation: {opacity:'show',height:'show'},
speed: 'fast'
});
});
function washing_center_open(){
window.respNav=true;
jQuery(".sidenav").addClass("open");
}
function washing_center_close(){
window.respNav=false;
jQuery(".sidenav").removeClass("open");
}
jQuery(document).ready(function (){
window.currentfocus=null;
washing_center_checkfocusdElement();
var body=document.querySelector('body');
body.addEventListener('keyup', washing_center_check_tab_press);
var gotoHome=false;
var gotoClose=false;
window.respNav=false;
function washing_center_checkfocusdElement(){
if(window.currentfocus=document.activeElement.className){
window.currentfocus=document.activeElement.className;
}}
function washing_center_check_tab_press(e){
"use strict";
e=e||event;
var activeElement;
if(window.innerWidth < 999){
if(e.keyCode==9){
if(window.respNav){
if(!e.shiftKey){
if(gotoHome){
jQuery(".main-menu-navigation ul:first li:first a:first-child").focus();
}}
if(jQuery("a.closebtn").is(":focus")){
gotoHome=true;
}else{
gotoHome=false;
}}
}}
if(e.shiftKey&&e.keyCode==9){
if(window.innerWidth < 999){
if(window.currentfocus=="header-search"){
jQuery(".mobiletoggle").focus();
}else{
if(window.respNav){
if(gotoClose){
jQuery("a.closebtn").focus();
}
if(jQuery(".main-menu-navigation ul:first li:first a:first-child").is(":focus")){
gotoClose=true;
}else{
gotoClose=false;
}}
}}
}
washing_center_checkfocusdElement();
}});
(function ($, w){
"use strict";
var methods=(function (){
var c={
bcClass: 'sf-breadcrumb',
menuClass: 'sf-js-enabled',
anchorClass: 'sf-with-ul',
menuArrowClass: 'sf-arrows'
},
ios=(function (){
var ios=/^(?![\w\W]*Windows Phone)[\w\W]*(iPhone|iPad|iPod)/i.test(navigator.userAgent);
if(ios){
$('html').css('cursor', 'pointer').on('click', $.noop);
}
return ios;
})(),
wp7=(function (){
var style=document.documentElement.style;
return ('behavior' in style&&'fill' in style&&/iemobile/i.test(navigator.userAgent));
})(),
unprefixedPointerEvents=(function (){
return (!!w.PointerEvent);
})(),
toggleMenuClasses=function ($menu, o){
var classes=c.menuClass;
if(o.cssArrows){
classes +=' ' + c.menuArrowClass;
}
$menu.toggleClass(classes);
},
setPathToCurrent=function ($menu, o){
return $menu.find('li.' + o.pathClass).slice(0, o.pathLevels)
.addClass(o.hoverClass + ' ' + c.bcClass)
.filter(function (){
return ($(this).children(o.popUpSelector).hide().show().length);
}).removeClass(o.pathClass);
},
toggleAnchorClass=function ($li){
$li.children('a').toggleClass(c.anchorClass);
},
toggleTouchAction=function ($menu){
var msTouchAction=$menu.css('ms-touch-action');
var touchAction=$menu.css('touch-action');
touchAction=touchAction||msTouchAction;
touchAction=(touchAction==='pan-y') ? 'auto':'pan-y';
$menu.css({
'ms-touch-action': touchAction,
'touch-action': touchAction
});
},
applyHandlers=function ($menu, o){
var targets='li:has(' + o.popUpSelector + ')';
if($.fn.hoverIntent&&!o.disableHI){
$menu.hoverIntent(over, out, targets);
}else{
$menu
.on('mouseenter.superfish', targets, over)
.on('mouseleave.superfish', targets, out);
}
var touchevent='MSPointerDown.superfish';
if(unprefixedPointerEvents){
touchevent='pointerdown.superfish';
}
if(!ios){
touchevent +=' touchend.superfish';
}
if(wp7){
touchevent +=' mousedown.superfish';
}
$menu
.on('focusin.superfish', 'li', over)
.on('focusout.superfish', 'li', out)
.on(touchevent, 'a', o, touchHandler);
},
touchHandler=function (e){
var $this=$(this),
o=getOptions($this),
$ul=$this.siblings(e.data.popUpSelector);
if(o.onHandleTouch.call($ul)===false){
return this;
}
if($ul.length > 0&&$ul.is(':hidden')){
$this.one('click.superfish', false);
if(e.type==='MSPointerDown'||e.type==='pointerdown'){
$this.trigger('focus');
}else{
$.proxy(over, $this.parent('li'))();
}}
},
over=function (){
var $this=$(this),
o=getOptions($this);
clearTimeout(o.sfTimer);
$this.siblings().superfish('hide').end().superfish('show');
},
out=function (){
var $this=$(this),
o=getOptions($this);
if(ios){
$.proxy(close, $this, o)();
}else{
clearTimeout(o.sfTimer);
o.sfTimer=setTimeout($.proxy(close, $this, o), o.delay);
}},
close=function (o){
o.retainPath=($.inArray(this[0], o.$path) > -1);
this.superfish('hide');
if(!this.parents('.' + o.hoverClass).length){
o.onIdle.call(getMenu(this));
if(o.$path.length){
$.proxy(over, o.$path)();
}}
},
getMenu=function ($el){
return $el.closest('.' + c.menuClass);
},
getOptions=function ($el){
return getMenu($el).data('sf-options');
};
return {
hide: function (instant){
if(this.length){
var $this=this,
o=getOptions($this);
if(!o){
return this;
}
var not=(o.retainPath===true) ? o.$path:'',
$ul=$this.find('li.' + o.hoverClass).add(this).not(not).removeClass(o.hoverClass).children(o.popUpSelector),
speed=o.speedOut;
if(instant){
$ul.show();
speed=0;
}
o.retainPath=false;
if(o.onBeforeHide.call($ul)===false){
return this;
}
$ul.stop(true, true).animate(o.animationOut, speed, function (){
var $this=$(this);
o.onHide.call($this);
});
}
return this;
},
show: function (){
var o=getOptions(this);
if(!o){
return this;
}
var $this=this.addClass(o.hoverClass),
$ul=$this.children(o.popUpSelector);
if(o.onBeforeShow.call($ul)===false){
return this;
}
$ul.stop(true, true).animate(o.animation, o.speed, function (){
o.onShow.call($ul);
});
return this;
},
destroy: function (){
return this.each(function (){
var $this=$(this),
o=$this.data('sf-options'),
$hasPopUp;
if(!o){
return false;
}
$hasPopUp=$this.find(o.popUpSelector).parent('li');
clearTimeout(o.sfTimer);
toggleMenuClasses($this, o);
toggleAnchorClass($hasPopUp);
toggleTouchAction($this);
$this.off('.superfish').off('.hoverIntent');
$hasPopUp.children(o.popUpSelector).attr('style', function (i, style){
return style.replace(/display[^;]+;?/g, '');
});
o.$path.removeClass(o.hoverClass + ' ' + c.bcClass).addClass(o.pathClass);
$this.find('.' + o.hoverClass).removeClass(o.hoverClass);
o.onDestroy.call($this);
$this.removeData('sf-options');
});
},
init: function (op){
return this.each(function (){
var $this=$(this);
if($this.data('sf-options')){
return false;
}
var o=$.extend({}, $.fn.superfish.defaults, op),
$hasPopUp=$this.find(o.popUpSelector).parent('li');
o.$path=setPathToCurrent($this, o);
$this.data('sf-options', o);
toggleMenuClasses($this, o);
toggleAnchorClass($hasPopUp);
toggleTouchAction($this);
applyHandlers($this, o);
$hasPopUp.not('.' + c.bcClass).superfish('hide', true);
o.onInit.call(this);
});
}};})();
$.fn.superfish=function (method, args){
if(methods[method]){
return methods[method].apply(this, Array.prototype.slice.call(arguments, 1));
}
else if(typeof method==='object'||! method){
return methods.init.apply(this, arguments);
}else{
return $.error('Method ' + method + ' does not exist on jQuery.fn.superfish');
}};
$.fn.superfish.defaults={
popUpSelector: 'ul,.sf-mega',
hoverClass: 'sfHover',
pathClass: 'overrideThisToUse',
pathLevels: 1,
delay: 800,
animation: {opacity: 'show'},
animationOut: {opacity: 'hide'},
speed: 'normal',
speedOut: 'fast',
cssArrows: true,
disableHI: false,
onInit: $.noop,
onBeforeShow: $.noop,
onShow: $.noop,
onBeforeHide: $.noop,
onHide: $.noop,
onIdle: $.noop,
onDestroy: $.noop,
onHandleTouch: $.noop
};})(jQuery, window);
var cff_js_exists=(typeof cff_js_exists!=='undefined') ? true:false;
if(!cff_js_exists){
if(jQuery('#cff.cff-masonry-js').length){
!function(a){function b(){}
function c(a){function c(b){b.prototype.option||(b.prototype.option=function(b){a.isPlainObject(b)&&(this.options=a.extend(!0,this.options,b))})}
function e(b,c){a.fn[b]=function(e){if("string"==typeof e){for(var g=d.call(arguments,1),h=0,i=this.length;i>h;h++){var j=this[h],k=a.data(j,b);if(k)if(a.isFunction(k[e])&&"_"!==e.charAt(0)){var l=k[e].apply(k,g);if(void 0!==l)return l}else f("no such method '"+e+"' for "+b+" instance");else f("cannot call methods on "+b+" prior to initialization; attempted to call '"+e+"'")}
return this}
return this.each(function(){var d=a.data(this,b);d?(d.option(e),d._init()):(d=new c(this,e),a.data(this,b,d))})}}
if(a){var f="undefined"==typeof console?b:function(a){console.error(a)};return a.bridget=function(a,b){c(b),e(a,b)},a.bridget}}
var d=Array.prototype.slice;"function"==typeof define&&define.amd?define("jquery-bridget/jquery.bridget",["jquery"],c):c("object"==typeof exports?require("jquery"):a.jQuery)}(window),function(a){function b(b){var c=a.event;return c.target=c.target||c.srcElement||b,c}
var c=document.documentElement,d=function(){};c.addEventListener?d=function(a,b,c){a.addEventListener(b,c,!1)}:c.attachEvent&&(d=function(a,c,d){a[c+d]=d.handleEvent?function(){var c=b(a);d.handleEvent.call(d,c)}:function(){var c=b(a);d.call(a,c)},a.attachEvent("on"+c,a[c+d])});var e=function(){};c.removeEventListener?e=function(a,b,c){a.removeEventListener(b,c,!1)}:c.detachEvent&&(e=function(a,b,c){a.detachEvent("on"+b,a[b+c]);try{delete a[b+c]}catch(d){a[b+c]=void 0}});var f={bind:d,unbind:e};"function"==typeof define&&define.amd?define("eventie/eventie",f):"object"==typeof exports?module.exports=f:a.eventie=f}(window),function(){function a(){}
function b(a,b){for(var c=a.length;c--;)if(a[c].listener===b)return c;return-1}
function c(a){return function(){return this[a].apply(this,arguments)}}
var d=a.prototype,e=this,f=e.EventEmitter;d.getListeners=function(a){var b,c,d=this._getEvents();if(a instanceof RegExp){b={};for(c in d)d.hasOwnProperty(c)&&a.test(c)&&(b[c]=d[c])}else b=d[a]||(d[a]=[]);return b},d.flattenListeners=function(a){var b,c=[];for(b=0;be;e++)if(b=c[e]+a,"string"==typeof d[b])return b}}
var c="Webkit Moz ms Ms O".split(" "),d=document.documentElement.style;"function"==typeof define&&define.amd?define("get-style-property/get-style-property",[],function(){return b}):"object"==typeof exports?module.exports=b:a.getStyleProperty=b}(window),function(a){function b(a){var b=parseFloat(a),c=-1===a.indexOf("%")&&!isNaN(b);return c&&b}
function c(){}
function d(){for(var a={width:0,height:0,innerWidth:0,innerHeight:0,outerWidth:0,outerHeight:0},b=0,c=g.length;c>b;b++){var d=g[b];a[d]=0}
return a}
function e(c){function e(){if(!m){m=!0;var d=a.getComputedStyle;if(j=function(){var a=d?function(a){return d(a,null)}:function(a){return a.currentStyle};return function(b){var c=a(b);return c||f("Style returned "+c+". Are you running this code in a hidden iframe on Firefox? See http://bit.ly/getsizebug1"),c}}(),k=c("boxSizing")){var e=document.createElement("div");e.style.width="200px",e.style.padding="1px 2px 3px 4px",e.style.borderStyle="solid",e.style.borderWidth="1px 2px 3px 4px",e.style[k]="border-box";var g=document.body||document.documentElement;g.appendChild(e);var h=j(e);l=200===b(h.width),g.removeChild(e)}}}
function h(a){if(e(),"string"==typeof a&&(a=document.querySelector(a)),a&&"object"==typeof a&&a.nodeType){var c=j(a);if("none"===c.display)return d();var f={};f.width=a.offsetWidth,f.height=a.offsetHeight;for(var h=f.isBorderBox=!(!k||!c[k]||"border-box"!==c[k]),m=0,n=g.length;n>m;m++){var o=g[m],p=c[o];p=i(a,p);var q=parseFloat(p);f[o]=isNaN(q)?0:q}
var r=f.paddingLeft+f.paddingRight,s=f.paddingTop+f.paddingBottom,t=f.marginLeft+f.marginRight,u=f.marginTop+f.marginBottom,v=f.borderLeftWidth+f.borderRightWidth,w=f.borderTopWidth+f.borderBottomWidth,x=h&&l,y=b(c.width);y!==!1&&(f.width=y+(x?0:r+v));var z=b(c.height);return z!==!1&&(f.height=z+(x?0:s+w)),f.innerWidth=f.width-(r+v),f.innerHeight=f.height-(s+w),f.outerWidth=f.width+t,f.outerHeight=f.height+u,f}}
function i(b,c){if(a.getComputedStyle||-1===c.indexOf("%"))return c;var d=b.style,e=d.left,f=b.runtimeStyle,g=f&&f.left;return g&&(f.left=b.currentStyle.left),d.left=c,c=d.pixelLeft,d.left=e,g&&(f.left=g),c}
var j,k,l,m=!1;return h}
var f="undefined"==typeof console?c:function(a){console.error(a)},g=["paddingLeft","paddingRight","paddingTop","paddingBottom","marginLeft","marginRight","marginTop","marginBottom","borderLeftWidth","borderRightWidth","borderTopWidth","borderBottomWidth"];"function"==typeof define&&define.amd?define("get-size/get-size",["get-style-property/get-style-property"],e):"object"==typeof exports?module.exports=e(require("desandro-get-style-property")):a.getSize=e(a.getStyleProperty)}(window),function(a){function b(a){"function"==typeof a&&(b.isReady?a():g.push(a))}
function c(a){var c="readystatechange"===a.type&&"complete"!==f.readyState;b.isReady||c||d()}
function d(){b.isReady=!0;for(var a=0,c=g.length;c>a;a++){var d=g[a];d()}}
function e(e){return"complete"===f.readyState?d():(e.bind(f,"DOMContentLoaded",c),e.bind(f,"readystatechange",c),e.bind(a,"load",c)),b}
var f=a.document,g=[];b.isReady=!1,"function"==typeof define&&define.amd?define("doc-ready/doc-ready",["eventie/eventie"],e):"object"==typeof exports?module.exports=e(require("eventie")):a.docReady=e(a.eventie)}(window),function(a){function b(a,b){return a[g](b)}
function c(a){if(!a.parentNode){var b=document.createDocumentFragment();b.appendChild(a)}}
function d(a,b){c(a);for(var d=a.parentNode.querySelectorAll(b),e=0,f=d.length;f>e;e++)if(d[e]===a)return!0;return!1}
function e(a,d){return c(a),b(a,d)}
var f,g=function(){if(a.matches)return"matches";if(a.matchesSelector)return"matchesSelector";for(var b=["webkit","moz","ms","o"],c=0,d=b.length;d>c;c++){var e=b[c],f=e+"MatchesSelector";if(a[f])return f}}();if(g){var h=document.createElement("div"),i=b(h,"div");f=i?b:e}else f=d;"function"==typeof define&&define.amd?define("matches-selector/matches-selector",[],function(){return f}):"object"==typeof exports?module.exports=f:window.matchesSelector=f}(Element.prototype),function(a,b){"function"==typeof define&&define.amd?define("fizzy-ui-utils/utils",["doc-ready/doc-ready","matches-selector/matches-selector"],function(c,d){return b(a,c,d)}):"object"==typeof exports?module.exports=b(a,require("doc-ready"),require("desandro-matches-selector")):a.fizzyUIUtils=b(a,a.docReady,a.matchesSelector)}(window,function(a,b,c){var d={};d.extend=function(a,b){for(var c in b)a[c]=b[c];return a},d.modulo=function(a,b){return(a%b+b)%b};var e=Object.prototype.toString;d.isArray=function(a){return"[object Array]"==e.call(a)},d.makeArray=function(a){var b=[];if(d.isArray(a))b=a;else if(a&&"number"==typeof a.length)for(var c=0,e=a.length;e>c;c++)b.push(a[c]);else b.push(a);return b},d.indexOf=Array.prototype.indexOf?function(a,b){return a.indexOf(b)}:function(a,b){for(var c=0,d=a.length;d>c;c++)if(a[c]===b)return c;return-1},d.removeFrom=function(a,b){var c=d.indexOf(a,b);-1!=c&&a.splice(c,1)},d.isElement="function"==typeof HTMLElement||"object"==typeof HTMLElement?function(a){return a instanceof HTMLElement}:function(a){return a&&"object"==typeof a&&1==a.nodeType&&"string"==typeof a.nodeName},d.setText=function(){function a(a,c){b=b||(void 0!==document.documentElement.textContent?"textContent":"innerText"),a[b]=c}
var b;return a}(),d.getParent=function(a,b){for(;a!=document.body;)if(a=a.parentNode,c(a,b))return a},d.getQueryElement=function(a){return"string"==typeof a?document.querySelector(a):a},d.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},d.filterFindElements=function(a,b){a=d.makeArray(a);for(var e=[],f=0,g=a.length;g>f;f++){var h=a[f];if(d.isElement(h))if(b){c(h,b)&&e.push(h);for(var i=h.querySelectorAll(b),j=0,k=i.length;k>j;j++)e.push(i[j])}else e.push(h)}
return e},d.debounceMethod=function(a,b,c){var d=a.prototype[b],e=b+"Timeout";a.prototype[b]=function(){var a=this[e];a&&clearTimeout(a);var b=arguments,f=this;this[e]=setTimeout(function(){d.apply(f,b),delete f[e]},c||100)}},d.toDashed=function(a){return a.replace(/(.)([A-Z])/g,function(a,b,c){return b+"-"+c}).toLowerCase()};var f=a.console;return d.htmlInit=function(c,e){b(function(){for(var b=d.toDashed(e),g=document.querySelectorAll(".js-"+b),h="data-"+b+"-options",i=0,j=g.length;j>i;i++){var k,l=g[i],m=l.getAttribute(h);try{k=m&&JSON.parse(m)}catch(n){f&&f.error("Error parsing "+h+" on "+l.nodeName.toLowerCase()+(l.id?"#"+l.id:"")+": "+n);continue}
var o=new c(l,k),p=a.jQuery;p&&p.data(l,e,o)}})},d}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/item",["eventEmitter/EventEmitter","get-size/get-size","get-style-property/get-style-property","fizzy-ui-utils/utils"],function(c,d,e,f){return b(a,c,d,e,f)}):"object"==typeof exports?module.exports=b(a,require("wolfy87-eventemitter"),require("get-size"),require("desandro-get-style-property"),require("fizzy-ui-utils")):(a.Outlayer={},a.Outlayer.Item=b(a,a.EventEmitter,a.getSize,a.getStyleProperty,a.fizzyUIUtils))}(window,function(a,b,c,d,e){function f(a){for(var b in a)return!1;return b=null,!0}
function g(a,b){a&&(this.element=a,this.layout=b,this.position={x:0,y:0},this._create())}
var h=a.getComputedStyle,i=h?function(a){return h(a,null)}:function(a){return a.currentStyle},j=d("transition"),k=d("transform"),l=j&&k,m=!!d("perspective"),n={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"otransitionend",transition:"transitionend"}[j],o=["transform","transition","transitionDuration","transitionProperty"],p=function(){for(var a={},b=0,c=o.length;c>b;b++){var e=o[b],f=d(e);f&&f!==e&&(a[e]=f)}
return a}();e.extend(g.prototype,b.prototype),g.prototype._create=function(){this._transn={ingProperties:{},clean:{},onEnd:{}},this.css({position:"absolute"})},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.getSize=function(){this.size=c(this.element)},g.prototype.css=function(a){var b=this.element.style;for(var c in a){var d=p[c]||c;b[d]=a[c]}},g.prototype.getPosition=function(){var a=i(this.element),b=this.layout.options,c=b.isOriginLeft,d=b.isOriginTop,e=parseInt(a[c?"left":"right"],10),f=parseInt(a[d?"top":"bottom"],10);e=isNaN(e)?0:e,f=isNaN(f)?0:f;var g=this.layout.size;e-=c?g.paddingLeft:g.paddingRight,f-=d?g.paddingTop:g.paddingBottom,this.position.x=e,this.position.y=f},g.prototype.layoutPosition=function(){var a=this.layout.size,b=this.layout.options,c={},d=b.isOriginLeft?"paddingLeft":"paddingRight",e=b.isOriginLeft?"left":"right",f=b.isOriginLeft?"right":"left",g=this.position.x+a[d];g=b.percentPosition&&!b.isHorizontal?g/a.width*100+"%":g+"px",c[e]=g,c[f]="";var h=b.isOriginTop?"paddingTop":"paddingBottom",i=b.isOriginTop?"top":"bottom",j=b.isOriginTop?"bottom":"top",k=this.position.y+a[h];k=b.percentPosition&&b.isHorizontal?k/a.height*100+"%":k+"px",c[i]=k,c[j]="",this.css(c),this.emitEvent("layout",[this])};var q=m?function(a,b){return"translate3d("+a+"px, "+b+"px, 0)"}:function(a,b){return"translate("+a+"px, "+b+"px)"};g.prototype._transitionTo=function(a,b){this.getPosition();var c=this.position.x,d=this.position.y,e=parseInt(a,10),f=parseInt(b,10),g=e===this.position.x&&f===this.position.y;if(this.setPosition(a,b),g&&!this.isTransitioning)return void this.layoutPosition();var h=a-c,i=b-d,j={},k=this.layout.options;h=k.isOriginLeft?h:-h,i=k.isOriginTop?i:-i,j.transform=q(h,i),this.transition({to:j,onTransitionEnd:{transform:this.layoutPosition},isCleaning:!0})},g.prototype.goTo=function(a,b){this.setPosition(a,b),this.layoutPosition()},g.prototype.moveTo=l?g.prototype._transitionTo:g.prototype.goTo,g.prototype.setPosition=function(a,b){this.position.x=parseInt(a,10),this.position.y=parseInt(b,10)},g.prototype._nonTransition=function(a){this.css(a.to),a.isCleaning&&this._removeStyles(a.to);for(var b in a.onTransitionEnd)a.onTransitionEnd[b].call(this)},g.prototype._transition=function(a){if(!parseFloat(this.layout.options.transitionDuration))return void this._nonTransition(a);var b=this._transn;for(var c in a.onTransitionEnd)b.onEnd[c]=a.onTransitionEnd[c];for(c in a.to)b.ingProperties[c]=!0,a.isCleaning&&(b.clean[c]=!0);if(a.from){this.css(a.from);var d=this.element.offsetHeight;d=null}
this.enableTransition(a.to),this.css(a.to),this.isTransitioning=!0};var r=k&&e.toDashed(k)+",opacity";g.prototype.enableTransition=function(){this.isTransitioning||(this.css({transitionProperty:r,transitionDuration:this.layout.options.transitionDuration}),this.element.addEventListener(n,this,!1))},g.prototype.transition=g.prototype[j?"_transition":"_nonTransition"],g.prototype.onwebkitTransitionEnd=function(a){this.ontransitionend(a)},g.prototype.onotransitionend=function(a){this.ontransitionend(a)};var s={"-webkit-transform":"transform","-moz-transform":"transform","-o-transform":"transform"};g.prototype.ontransitionend=function(a){if(a.target===this.element){var b=this._transn,c=s[a.propertyName]||a.propertyName;if(delete b.ingProperties[c],f(b.ingProperties)&&this.disableTransition(),c in b.clean&&(this.element.style[a.propertyName]="",delete b.clean[c]),c in b.onEnd){var d=b.onEnd[c];d.call(this),delete b.onEnd[c]}
this.emitEvent("transitionEnd",[this])}},g.prototype.disableTransition=function(){this.removeTransitionStyles(),this.element.removeEventListener(n,this,!1),this.isTransitioning=!1},g.prototype._removeStyles=function(a){var b={};for(var c in a)b[c]="";this.css(b)};var t={transitionProperty:"",transitionDuration:""};return g.prototype.removeTransitionStyles=function(){this.css(t)},g.prototype.removeElem=function(){this.element.parentNode.removeChild(this.element),this.css({display:""}),this.emitEvent("remove",[this])},g.prototype.remove=function(){if(!j||!parseFloat(this.layout.options.transitionDuration))return void this.removeElem();var a=this;this.once("transitionEnd",function(){a.removeElem()}),this.hide()},g.prototype.reveal=function(){delete this.isHidden,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("visibleStyle");b[c]=this.onRevealTransitionEnd,this.transition({from:a.hiddenStyle,to:a.visibleStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onRevealTransitionEnd=function(){this.isHidden||this.emitEvent("reveal")},g.prototype.getHideRevealTransitionEndProperty=function(a){var b=this.layout.options[a];if(b.opacity)return"opacity";for(var c in b)return c},g.prototype.hide=function(){this.isHidden=!0,this.css({display:""});var a=this.layout.options,b={},c=this.getHideRevealTransitionEndProperty("hiddenStyle");b[c]=this.onHideTransitionEnd,this.transition({from:a.visibleStyle,to:a.hiddenStyle,isCleaning:!0,onTransitionEnd:b})},g.prototype.onHideTransitionEnd=function(){this.isHidden&&(this.css({display:"none"}),this.emitEvent("hide"))},g.prototype.destroy=function(){this.css({position:"",left:"",right:"",top:"",bottom:"",transition:"",transform:""})},g}),function(a,b){"function"==typeof define&&define.amd?define("outlayer/outlayer",["eventie/eventie","eventEmitter/EventEmitter","get-size/get-size","fizzy-ui-utils/utils","./item"],function(c,d,e,f,g){return b(a,c,d,e,f,g)}):"object"==typeof exports?module.exports=b(a,require("eventie"),require("wolfy87-eventemitter"),require("get-size"),require("fizzy-ui-utils"),require("./item")):a.Outlayer=b(a,a.eventie,a.EventEmitter,a.getSize,a.fizzyUIUtils,a.Outlayer.Item)}(window,function(a,b,c,d,e,f){function g(a,b){var c=e.getQueryElement(a);if(!c)return void(h&&h.error("Bad element for "+this.constructor.namespace+": "+(c||a)));this.element=c,i&&(this.$element=i(this.element)),this.options=e.extend({},this.constructor.defaults),this.option(b);var d=++k;this.element.outlayerGUID=d,l[d]=this,this._create(),this.options.isInitLayout&&this.layout()}
var h=a.console,i=a.jQuery,j=function(){},k=0,l={};return g.namespace="outlayer",g.Item=f,g.defaults={containerStyle:{position:"relative"},isInitLayout:!0,isOriginLeft:!0,isOriginTop:!0,isResizeBound:!0,isResizingContainer:!0,transitionDuration:"0.4s",hiddenStyle:{opacity:0,transform:"scale(0.001)"},visibleStyle:{opacity:1,transform:"scale(1)"}},e.extend(g.prototype,c.prototype),g.prototype.option=function(a){e.extend(this.options,a)},g.prototype._create=function(){this.reloadItems(),this.stamps=[],this.stamp(this.options.stamp),e.extend(this.element.style,this.options.containerStyle),this.options.isResizeBound&&this.bindResize()},g.prototype.reloadItems=function(){this.items=this._itemize(this.element.children)},g.prototype._itemize=function(a){for(var b=this._filterFindItemElements(a),c=this.constructor.Item,d=[],e=0,f=b.length;f>e;e++){var g=b[e],h=new c(g,this);d.push(h)}
return d},g.prototype._filterFindItemElements=function(a){return e.filterFindElements(a,this.options.itemSelector)},g.prototype.getItemElements=function(){for(var a=[],b=0,c=this.items.length;c>b;b++)a.push(this.items[b].element);return a},g.prototype.layout=function(){this._resetLayout(),this._manageStamps();var a=void 0!==this.options.isLayoutInstant?this.options.isLayoutInstant:!this._isLayoutInited;this.layoutItems(this.items,a),this._isLayoutInited=!0},g.prototype._init=g.prototype.layout,g.prototype._resetLayout=function(){this.getSize()},g.prototype.getSize=function(){this.size=d(this.element)},g.prototype._getMeasurement=function(a,b){var c,f=this.options[a];f?("string"==typeof f?c=this.element.querySelector(f):e.isElement(f)&&(c=f),this[a]=c?d(c)[b]:f):this[a]=0},g.prototype.layoutItems=function(a,b){a=this._getItemsForLayout(a),this._layoutItems(a,b),this._postLayout()},g.prototype._getItemsForLayout=function(a){for(var b=[],c=0,d=a.length;d>c;c++){var e=a[c];e.isIgnored||b.push(e)}
return b},g.prototype._layoutItems=function(a,b){if(this._emitCompleteOnItems("layout",a),a&&a.length){for(var c=[],d=0,e=a.length;e>d;d++){var f=a[d],g=this._getItemLayoutPosition(f);g.item=f,g.isInstant=b||f.isLayoutInstant,c.push(g)}
this._processLayoutQueue(c)}},g.prototype._getItemLayoutPosition=function(){return{x:0,y:0}},g.prototype._processLayoutQueue=function(a){for(var b=0,c=a.length;c>b;b++){var d=a[b];this._positionItem(d.item,d.x,d.y,d.isInstant)}},g.prototype._positionItem=function(a,b,c,d){d?a.goTo(b,c):a.moveTo(b,c)},g.prototype._postLayout=function(){this.resizeContainer()},g.prototype.resizeContainer=function(){if(this.options.isResizingContainer){var a=this._getContainerSize();a&&(this._setContainerMeasure(a.width,!0),this._setContainerMeasure(a.height,!1))}},g.prototype._getContainerSize=j,g.prototype._setContainerMeasure=function(a,b){if(void 0!==a){var c=this.size;c.isBorderBox&&(a+=b?c.paddingLeft+c.paddingRight+c.borderLeftWidth+c.borderRightWidth:c.paddingBottom+c.paddingTop+c.borderTopWidth+c.borderBottomWidth),a=Math.max(a,0),this.element.style[b?"width":"height"]=a+"px"}},g.prototype._emitCompleteOnItems=function(a,b){function c(){e.emitEvent(a+"Complete",[b])}
function d(){g++,g===f&&c()}
var e=this,f=b.length;if(!b||!f)return void c();for(var g=0,h=0,i=b.length;i>h;h++){var j=b[h];j.once(a,d)}},g.prototype.ignore=function(a){var b=this.getItem(a);b&&(b.isIgnored=!0)},g.prototype.unignore=function(a){var b=this.getItem(a);b&&delete b.isIgnored},g.prototype.stamp=function(a){if(a=this._find(a)){this.stamps=this.stamps.concat(a);for(var b=0,c=a.length;c>b;b++){var d=a[b];this.ignore(d)}}},g.prototype.unstamp=function(a){if(a=this._find(a))for(var b=0,c=a.length;c>b;b++){var d=a[b];e.removeFrom(this.stamps,d),this.unignore(d)}},g.prototype._find=function(a){return a?("string"==typeof a&&(a=this.element.querySelectorAll(a)),a=e.makeArray(a)):void 0},g.prototype._manageStamps=function(){if(this.stamps&&this.stamps.length){this._getBoundingRect();for(var a=0,b=this.stamps.length;b>a;a++){var c=this.stamps[a];this._manageStamp(c)}}},g.prototype._getBoundingRect=function(){var a=this.element.getBoundingClientRect(),b=this.size;this._boundingRect={left:a.left+b.paddingLeft+b.borderLeftWidth,top:a.top+b.paddingTop+b.borderTopWidth,right:a.right-(b.paddingRight+b.borderRightWidth),bottom:a.bottom-(b.paddingBottom+b.borderBottomWidth)}},g.prototype._manageStamp=j,g.prototype._getElementOffset=function(a){var b=a.getBoundingClientRect(),c=this._boundingRect,e=d(a),f={left:b.left-c.left-e.marginLeft,top:b.top-c.top-e.marginTop,right:c.right-b.right-e.marginRight,bottom:c.bottom-b.bottom-e.marginBottom};return f},g.prototype.handleEvent=function(a){var b="on"+a.type;this[b]&&this[b](a)},g.prototype.bindResize=function(){this.isResizeBound||(b.bind(a,"resize",this),this.isResizeBound=!0)},g.prototype.unbindResize=function(){this.isResizeBound&&b.unbind(a,"resize",this),this.isResizeBound=!1},g.prototype.onresize=function(){function a(){b.resize(),delete b.resizeTimeout}
this.resizeTimeout&&clearTimeout(this.resizeTimeout);var b=this;this.resizeTimeout=setTimeout(a,100)},g.prototype.resize=function(){this.isResizeBound&&this.needsResizeLayout()&&this.layout()},g.prototype.needsResizeLayout=function(){var a=d(this.element),b=this.size&&a;return b&&a.innerWidth!==this.size.innerWidth},g.prototype.addItems=function(a){var b=this._itemize(a);return b.length&&(this.items=this.items.concat(b)),b},g.prototype.appended=function(a){var b=this.addItems(a);b.length&&(this.layoutItems(b,!0),this.reveal(b))},g.prototype.prepended=function(a){var b=this._itemize(a);if(b.length){var c=this.items.slice(0);this.items=b.concat(c),this._resetLayout(),this._manageStamps(),this.layoutItems(b,!0),this.reveal(b),this.layoutItems(c)}},g.prototype.reveal=function(a){this._emitCompleteOnItems("reveal",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.reveal()}},g.prototype.hide=function(a){this._emitCompleteOnItems("hide",a);for(var b=a&&a.length,c=0;b&&b>c;c++){var d=a[c];d.hide()}},g.prototype.revealItemElements=function(a){var b=this.getItems(a);this.reveal(b)},g.prototype.hideItemElements=function(a){var b=this.getItems(a);this.hide(b)},g.prototype.getItem=function(a){for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];if(d.element===a)return d}},g.prototype.getItems=function(a){a=e.makeArray(a);for(var b=[],c=0,d=a.length;d>c;c++){var f=a[c],g=this.getItem(f);g&&b.push(g)}
return b},g.prototype.remove=function(a){var b=this.getItems(a);if(this._emitCompleteOnItems("remove",b),b&&b.length)for(var c=0,d=b.length;d>c;c++){var f=b[c];f.remove(),e.removeFrom(this.items,f)}},g.prototype.destroy=function(){var a=this.element.style;a.height="",a.position="",a.width="";for(var b=0,c=this.items.length;c>b;b++){var d=this.items[b];d.destroy()}
this.unbindResize();var e=this.element.outlayerGUID;delete l[e],delete this.element.outlayerGUID,i&&i.removeData(this.element,this.constructor.namespace)},g.data=function(a){a=e.getQueryElement(a);var b=a&&a.outlayerGUID;return b&&l[b]},g.create=function(a,b){function c(){g.apply(this,arguments)}
return Object.create?c.prototype=Object.create(g.prototype):e.extend(c.prototype,g.prototype),c.prototype.constructor=c,c.defaults=e.extend({},g.defaults),e.extend(c.defaults,b),c.prototype.settings={},c.namespace=a,c.data=g.data,c.Item=function(){f.apply(this,arguments)},c.Item.prototype=new f,e.htmlInit(c,a),i&&i.bridget&&i.bridget(a,c),c},g.Item=f,g}),function(a,b){"function"==typeof define&&define.amd?define(["outlayer/outlayer","get-size/get-size","fizzy-ui-utils/utils"],b):"object"==typeof exports?module.exports=b(require("outlayer"),require("get-size"),require("fizzy-ui-utils")):a.Masonry=b(a.Outlayer,a.getSize,a.fizzyUIUtils)}(window,function(a,b,c){var d=a.create("masonry");return d.prototype._resetLayout=function(){this.getSize(),this._getMeasurement("columnWidth","outerWidth"),this._getMeasurement("gutter","outerWidth"),this.measureColumns();var a=this.cols;for(this.colYs=[];a--;)this.colYs.push(0);this.maxY=0},d.prototype.measureColumns=function(){if(this.getContainerWidth(),!this.columnWidth){var a=this.items[0],c=a&&a.element;this.columnWidth=c&&b(c).outerWidth||this.containerWidth}
var d=this.columnWidth+=this.gutter,e=this.containerWidth+this.gutter,f=e/d,g=d-e%d,h=g&&1>g?"round":"floor";f=Math[h](f),this.cols=Math.max(f,1)},d.prototype.getContainerWidth=function(){var a=this.options.isFitWidth?this.element.parentNode:this.element,c=b(a);this.containerWidth=c&&c.innerWidth},d.prototype._getItemLayoutPosition=function(a){a.getSize();var b=a.size.outerWidth%this.columnWidth,d=b&&1>b?"round":"ceil",e=Math[d](a.size.outerWidth/this.columnWidth);e=Math.min(e,this.cols);for(var f=this._getColGroup(e),g=Math.min.apply(Math,f),h=c.indexOf(f,g),i={x:this.columnWidth*h,y:g},j=g+a.size.outerHeight,k=this.cols+1-f.length,l=0;k>l;l++)this.colYs[h+l]=j;return i},d.prototype._getColGroup=function(a){if(2>a)return this.colYs;for(var b=[],c=this.cols+1-a,d=0;c>d;d++){var e=this.colYs.slice(d,d+a);b[d]=Math.max.apply(Math,e)}
return b},d.prototype._manageStamp=function(a){var c=b(a),d=this._getElementOffset(a),e=this.options.isOriginLeft?d.left:d.right,f=e+c.outerWidth,g=Math.floor(e/this.columnWidth);g=Math.max(0,g);var h=Math.floor(f/this.columnWidth);h-=f%this.columnWidth?0:1,h=Math.min(this.cols-1,h);for(var i=(this.options.isOriginTop?d.top:d.bottom)+c.outerHeight,j=g;h>=j;j++)this.colYs[j]=Math.max(i,this.colYs[j])},d.prototype._getContainerSize=function(){this.maxY=Math.max.apply(Math,this.colYs);var a={height:this.maxY};return this.options.isFitWidth&&(a.width=this._getContainerFitWidth()),a},d.prototype._getContainerFitWidth=function(){for(var a=0,b=this.cols;--b&&0===this.colYs[b];)a++;return(this.cols-a)*this.columnWidth-this.gutter},d.prototype.needsResizeLayout=function(){var a=this.containerWidth;return this.getContainerWidth(),a!==this.containerWidth},d})
function cffAddMasonry($self){
var evt=jQuery.Event('cffbeforemasonry');
evt.$self=$self;
jQuery(window).trigger(evt);
if(typeof $self.masonry!=='function'){
return;
}
var windowWidth=jQuery(window).width(),
masonryEnabled=false;
if(windowWidth > 800){
if($self.hasClass('masonry-1-desktop')){
$self.addClass('cff-disable-masonry');
}else{
masonryEnabled=true;
$self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry');
}}else if(windowWidth > 480){
if($self.hasClass('masonry-2-tablet')
|| $self.hasClass('masonry-3-tablet')
|| $self.hasClass('masonry-4-tablet')
|| $self.hasClass('masonry-5-tablet')
|| $self.hasClass('masonry-6-tablet')){
masonryEnabled=true;
$self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry');
}else{
$self.addClass('cff-disable-masonry');
}}else{
if($self.hasClass('masonry-2-mobile')
|| $self.hasClass('masonry-3-mobile')){
masonryEnabled=true;
$self.addClass('cff-masonry cff-masonry-js').removeClass('cff-disable-masonry');
}else{
$self.addClass('cff-disable-masonry');
}}
if(masonryEnabled){
if($self.find('.cff-item').length){
var itemSelector={itemSelector:'.cff-new, .cff-item, .cff-likebox'};
$self.find('.cff-posts-wrap').masonry(itemSelector);
$self.find('.cff-item').each(function(){
jQuery(this).css('margin-bottom', '15px');
});
}}
}}
function cff_init(){
/*
jQuery('.cff-likebox iframe').each(function(){
var $likebox=jQuery(this),
likeboxWidth=$likebox.attr('data-likebox-width'),
cffFeedWidth=$likebox.parent().width();
if(likeboxWidth=='') likeboxWidth=340;
if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth;
$likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+Math.floor(likeboxWidth)+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale'));
});
*/
jQuery('#cff .cff-item').each(function(){
var $self=jQuery(this);
if($self.find('.cff-viewpost-facebook').parent('p').length){
$self.find('.cff-viewpost-facebook').unwrap('p');
}
if($self.find('.cff-author').parent('p').length){
$self.find('.cff-author').eq(1).unwrap('p');
$self.find('.cff-author').eq(1).remove();
}
if($self.find('#cff .cff-link').parent('p').length){
$self.find('#cff .cff-link').unwrap('p');
}
var expanded=false,
$post_text=$self.find('.cff-post-text .cff-text'),
text_limit=$self.closest('#cff').attr('data-char');
if(typeof text_limit==='undefined'||text_limit=='') text_limit=99999;
var full_text=$post_text.html();
if(full_text==undefined) full_text='';
var cff_trunc_regx=new RegExp(/(<[^>]*>)/g);
var cff_trunc_counter=0;
full_text_arr=full_text.split(cff_trunc_regx);
for (var i=0, len=full_text_arr.length; i < len; i++){
if(!(cff_trunc_regx.test(full_text_arr[i]))){
if(cff_trunc_counter==text_limit){
full_text_arr.splice(i, 1);
continue;
}
cff_trunc_counter=cff_trunc_counter + full_text_arr[i].length;
if(cff_trunc_counter > text_limit){
var diff=cff_trunc_counter - text_limit;
full_text_arr[i]=full_text_arr[i].slice(0, -diff);
cff_trunc_counter=text_limit;
if(full_text.length > text_limit) $self.find('.cff-expand').show();
}}
}
var short_text=full_text_arr.join('');
short_text=short_text.replace(/(<(?!\/)[^>]+>)+(<\/[^>]+>)/g, "");
var lastChar=short_text.substr(short_text.length - 1);
if(lastChar=='<') short_text=short_text.substring(0, short_text.length - 1);
short_text=short_text.replace(/(
\s*)+$/,'');
short_text=short_text.replace(/(\s*)+$/,'');
$post_text.html(short_text);
$self.find('.cff-expand').on('click', function(e){
e.preventDefault();
var $expand=jQuery(this),
$more=$expand.find('.cff-more'),
$less=$expand.find('.cff-less');
if(expanded==false){
$post_text.html(full_text);
expanded=true;
$more.hide();
$less.show();
}else{
$post_text.html(short_text);
expanded=false;
$more.show();
$less.hide();
}
cffLinkHashtags();
$post_text.find('a').attr('target', '_blank');
if($self.closest('.cff').hasClass('cff-masonry-js')&&!$self.closest('.cff').hasClass('cff-masonry-css')){
cffAddMasonry($self.closest('.cff'));
}});
$post_text.find('a').add($self.find('.cff-post-desc a')).attr({
'target':'_blank',
'rel':'nofollow'
});
$sharedLink=$self.find('.cff-shared-link');
if($sharedLink.text()==''){
$sharedLink.remove();
}
function cffLinkHashtags(){
var cffTextStr=$self.find('.cff-text').html(),
cffDescStr=$self.find('.cff-post-desc').html(),
regex=/(^|\s)#(\w*[\u0041-\u005A\u0061-\u007A\u00AA\u00B5\u00BA\u00C0-\u00D6\u00D8-\u00F6\u00F8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u0527\u0531-\u0556\u0559\u0561-\u0587\u05D0-\u05EA\u05F0-\u05F2\u0620-\u064A\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE\u06EF\u06FA-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07CA-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u08A0\u08A2-\u08AC\u0904-\u0939\u093D\u0950\u0958-\u0961\u0971-\u0977\u0979-\u097F\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09F0\u09F1\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B71\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C33\u0C35-\u0C39\u0C3D\u0C58\u0C59\u0C60\u0C61\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDE\u0CE0\u0CE1\u0CF1\u0CF2\u0D05-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D60\u0D61\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E81\u0E82\u0E84\u0E87\u0E88\u0E8A\u0E8D\u0E94-\u0E97\u0E99-\u0E9F\u0EA1-\u0EA3\u0EA5\u0EA7\u0EAA\u0EAB\u0EAD-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0EDC-\u0EDF\u0F00\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1380-\u138F\u13A0-\u13F4\u1401-\u166C\u166F-\u167F\u1681-\u169A\u16A0-\u16EA\u1700-\u170C\u170E-\u1711\u1720-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u1820-\u1877\u1880-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191C\u1950-\u196D\u1970-\u1974\u1980-\u19AB\u19C1-\u19C7\u1A00-\u1A16\u1A20-\u1A54\u1AA7\u1B05-\u1B33\u1B45-\u1B4B\u1B83-\u1BA0\u1BAE\u1BAF\u1BBA-\u1BE5\u1C00-\u1C23\u1C4D-\u1C4F\u1C5A-\u1C7D\u1CE9-\u1CEC\u1CEE-\u1CF1\u1CF5\u1CF6\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2071\u207F\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2183\u2184\u2C00-\u2C2E\u2C30-\u2C5E\u2C60-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3005\u3006\u3031-\u3035\u303B\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312D\u3131-\u318E\u31A0-\u31BA\u31F0-\u31FF\u3400-\u4DB5\u4E00-\u9FCC\uA000-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA61F\uA62A\uA62B\uA640-\uA66E\uA67F-\uA697\uA6A0-\uA6E5\uA717-\uA71F\uA722-\uA788\uA78B-\uA78E\uA790-\uA793\uA7A0-\uA7AA\uA7F8-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA840-\uA873\uA882-\uA8B3\uA8F2-\uA8F7\uA8FB\uA90A-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA60-\uAA76\uAA7A\uAA80-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uABC0-\uABE2\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]+\w*)/gi,
linkcolor=$self.find('.cff-text').attr('data-color');
function replacer(hash){
var replacementString=jQuery.trim(hash);
if(/^#[0-9A-F]{6}$/i.test(replacementString)){
return replacementString;
}else{
return ' ' + replacementString + '';
}}
if(typeof cfflinkhashtags=='undefined') cfflinkhashtags='true';
if(cfflinkhashtags=='true'){
var $cffText=$self.find('.cff-text');
if($cffText.length > 0&&$cffText.find('.cff-post-text-link').length==0){
cffTextStr=cffTextStr.replace(/
/g, "
");
$cffText.html(cffTextStr.replace(regex , replacer));
}}
if($self.find('.cff-post-desc').length > 0) $self.find('.cff-post-desc').html(cffDescStr.replace(regex , replacer));
}
cffLinkHashtags();
$self.find('.cff-text a').add($self.find('.cff-post-desc a')).attr({
'target':'_blank',
'rel':'nofollow noopener noreferrer'
});
$self.find('.cff-share-link').on('click', function(e){
e.preventDefault();
var $cffShareTooltip=$self.find('.cff-share-tooltip')
if($cffShareTooltip.is(':visible')){
$cffShareTooltip.hide().find('a').removeClass('cff-show');
}else{
$cffShareTooltip.show();
var time=0;
$cffShareTooltip.find('a').each(function(){
var $cffShareIcon=jQuery(this);
setTimeout(function(){
$cffShareIcon.addClass('cff-show');
}, time);
time +=20;
});
}});
});
jQuery('.cff-wrapper').each(function(){
var $cff=jQuery(this).find('#cff');
var $cffElm=jQuery(this);
setTimeout(function(){
var consent=checkConsent($cffElm);
if(consent){
addFullFeatures($cffElm);
}else{
jQuery('.cff-gdpr-notice').css({'display':'inline-block'});
if($cffElm.find('.cff-visual-header').length){
$cffElm.find('.cff-header-text').closest('.cff-visual-header').addClass('cff-no-consent');
}}
},250)
if(typeof $cff.attr('data-nummobile')!=='undefined'){
var num=typeof $cff.attr('data-pag-num')!=='undefined'&&$cff.attr('data-pag-num')!=='' ? parseInt($cff.attr('data-pag-num')):1,
nummobile=typeof $cff.attr('data-nummobile')!=='undefined'&&$cff.attr('data-nummobile')!=='' ? parseInt($cff.attr('data-nummobile')):num,
itemSelector=$cff.find('.cff-item').length ? '.cff-item':'.cff-album-item';
if(jQuery(window).width() < 480){
if(nummobile < $cff.find(itemSelector).length){
$cff.find(itemSelector).slice(nummobile - $cff.find(itemSelector).length).addClass('cff-num-diff-hide');
}}else{
if(num < $cff.find(itemSelector).length){
$cff.find(itemSelector).slice(num - $cff.find(itemSelector).length).addClass('cff-num-diff-hide');
}}
$cff.removeAttr('data-nummobile');
}
if($cff.hasClass('cff-masonry-js')){
cffAddMasonry($cff);
setTimeout(function(){ cffAddMasonry($cff); }, 500);
jQuery(window).on('resize', function (){
setTimeout(function(){
cffAddMasonry($cff);
}, 500);
});
if($cff.find('.cff-credit').length) $cff.css('padding-bottom', 30);
}});
function cffSizeVisualHeader(){
jQuery('.cff-visual-header.cff-has-cover').each(function(){
var wrapperHeight=jQuery(this).find('.cff-header-hero').innerHeight(),
imageHeight=jQuery(this).find('.cff-header-hero img').innerHeight(),
wrapperWidth=jQuery(this).find('.cff-header-hero').innerWidth(),
imageWidth=jQuery(this).find('.cff-header-hero img').innerWidth(),
wrapperAspect=wrapperWidth/wrapperHeight,
imageAspect=imageWidth/imageHeight,
width=wrapperAspect < imageAspect ? wrapperHeight * imageAspect + 'px':'100%',
difference=imageHeight - wrapperHeight,
topMargin=Math.max(0,Math.round(difference/2)),
leftMargin=width!=='100%' ? Math.max(0,Math.round(((wrapperHeight * imageAspect)-wrapperWidth)/2)):0;
jQuery(this).find('.cff-header-hero img').css({
'opacity':1,
'display':'block',
'visibility':'visible',
'max-width':'none',
'max-height':'none',
'margin-top':- topMargin + 'px',
'margin-left':- leftMargin + 'px',
'width':width,
});
});
}setTimeout(cffSizeVisualHeader, 200);
jQuery(window).on('resize', function (){
setTimeout(function(){
cffSizeVisualHeader();
}, 500);
});
}
cff_init();
function checkConsent(ctn){
ctn=ctn.find('.cff-list-container');
var flags=typeof ctn.attr('data-cff-flags')!=='undefined' ? ctn.attr('data-cff-flags').split(','):[],
gdpr=(flags.indexOf('gdpr') > -1),
overrideBlockCDN=(flags.indexOf('overrideBlockCDN') > -1),
consentGiven=false;
if(consentGiven||!gdpr){
return true;
}
if(typeof window.cookieyes!=="undefined"){
console.log('here');
if(typeof window.cookieyes._ckyConsentStore.get!=='undefined'){
consentGiven=window.cookieyes._ckyConsentStore.get('functional')==='yes';
}}else if(typeof CLI_Cookie!=="undefined"){
if(CLI_Cookie.read(CLI_ACCEPT_COOKIE_NAME)!==null){
if(CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')!==null){
consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-non-necessary')==='yes';
}
if(CLI_Cookie.read('cookielawinfo-checkbox-necessary')!==null){
consentGiven=CLI_Cookie.read('cookielawinfo-checkbox-necessary')==='yes';
}}
}else if(typeof window.cnArgs!=="undefined"){
var value="; " + document.cookie,
parts=value.split('; cookie_notice_accepted=');
if(parts.length===2){
var val=parts.pop().split(';').shift();
consentGiven=(val==='true');
}}else if(typeof window.complianz!=='undefined'||typeof window.cookieconsent!=='undefined'){
consentGiven=cffCmplzGetCookie('cmplz_marketing')==='allow';
}else if(typeof window.Cookiebot!=="undefined"){
consentGiven=Cookiebot.consented;
}else if(typeof window.BorlabsCookie!=='undefined'){
consentGiven=window.BorlabsCookie.checkCookieConsent('facebook');
}
return consentGiven;
}
function cffCmplzGetCookie(cname){
var name=cname + "=";
var cArr=window.document.cookie.split(';');
for (var i=0; i < cArr.length; i++){
var c=cArr[i].trim();
if(c.indexOf(name)==0)
return c.substring(name.length, c.length);
}
return "";
}
function addFullFeatures(ctn){
ctn=jQuery(ctn);
jQuery('.cff-gdpr-notice').remove();
ctn.find('.cff-author-img').each(function(){
jQuery(this).find('img').attr('src',jQuery(this).attr('data-avatar'));
jQuery(this).removeClass('cff-no-consent');
});
ctn.find('.cff-likebox iframe').each(function(){
var $likebox=jQuery(this),
likeboxWidth=$likebox.attr('data-likebox-width'),
cffFeedWidth=$likebox.parent().width();
if(likeboxWidth=='') likeboxWidth=340;
if(cffFeedWidth < likeboxWidth) likeboxWidth=cffFeedWidth;
$likebox.attr('src', 'https://www.facebook.com/plugins/page.php?href=https%3A%2F%2Fwww.facebook.com%2F'+$likebox.attr('data-likebox-id')+'%2F&tabs&width='+Math.floor(likeboxWidth)+'&small_header='+$likebox.attr('data-likebox-header')+'&adapt_container_width=true&hide_cover='+$likebox.attr('data-hide-cover')+'&hide_cta='+$likebox.attr('data-hide-cta')+'&show_facepile='+$likebox.attr('data-likebox-faces')+'&locale='+$likebox.attr('data-locale'));
});
if(jQuery('.cff-visual-header').length){
jQuery('.cff-visual-header').each(function(){
jQuery(this).removeClass('cff-no-consent');
if(jQuery(this).find('.cff-header-hero').length){
jQuery(this).find('.cff-header-hero').find('img').attr('src',jQuery(this).find('.cff-header-hero').find('img').attr('data-cover-url'))
}
if(jQuery(this).find('.cff-header-img').length){
jQuery(this).find('.cff-header-img').find('img').attr('src',jQuery(this).find('.cff-header-img').find('img').attr('data-avatar'))
}});
}}
function afterConsentToggled(isConsent, ctn){
if(isConsent){
addFullFeatures(ctn);
}}
function cffGetFeedLocatorDataArray(){
var feedLocatorData=[];
jQuery('.cff-list-container').each(function(){
$cffPagUrl=jQuery(this).find('.cff-pag-url');
var locatorNonce='';
if(typeof $cffPagUrl.attr('data-locatornonce')!=='undefined'){
locatorNonce=$cffPagUrl.attr('data-locatornonce');
}
var singleFeedLocatorData={
feedID:$cffPagUrl.attr('data-feed-id'),
postID:$cffPagUrl.attr('data-post-id'),
shortCodeAtts:jQuery.trim($cffPagUrl.attr('data-cff-shortcode'))=='' ? null:JSON.parse($cffPagUrl.attr('data-cff-shortcode')),
location:locationGuess(jQuery(this)),
locator_nonce:locatorNonce
};
feedLocatorData.push(singleFeedLocatorData);
});
return feedLocatorData;
}
function locationGuess($cff=false){
var $feed=($cff==false) ? jQuery(this.el):$cff,
location='content';
if($feed.closest('footer').length){
location='footer';
}else if($feed.closest('.header').length
|| $feed.closest('header').length){
location='header';
}else if($feed.closest('.sidebar').length
|| $feed.closest('aside').length){
location='sidebar';
}
return location;
}
jQuery(document).ready(function(){
var $=jQuery;
$('#cookie-notice a').on('click', function(){
setTimeout(function(){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(checkConsent(jQuery(this)), jQuery(this));
});
},1000);
});
$('#cookie-law-info-bar a').on('click', function(){
setTimeout(function(){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(checkConsent(jQuery(this)), jQuery(this));
});
},1000);
});
$('.cli-user-preference-checkbox, .cky-notice button').on('click', function(){
setTimeout(function(){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(false, jQuery(this));
});
},1000);
});
$(window).on('CookiebotOnAccept', function (event){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(true, jQuery(this));
});
});
$('.cmplz-btn').on('click', function(){
if(typeof cmplz_accepted_categories==='function'){
setTimeout(function(){
var accepted=cmplz_accepted_categories();
if(accepted.indexOf('marketing') > -1){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(true, jQuery(this));
});
}},1000);
}});
$(document).on('cmplzEnableScripts', function (event){
if(event.detail==='marketing'){
jQuery('.cff-wrapper').each(function (index){
afterConsentToggled(true, jQuery(this));
});
}});
$(document).on('cmplzFireCategories', function (event){
if(event.detail.category==='marketing'){
jQuery('.cff-wrapper').each(function (index){
afterConsentToggled(false, jQuery(this));
});
}});
$(document).on('borlabs-cookie-consent-saved', function (event){
jQuery('.cff-wrapper').each(function(index){
afterConsentToggled(true, jQuery(this));
});
});
if($('.cff-list-container').length){
var feedLocatorData=cffGetFeedLocatorDataArray();
$.ajax({
url: cffajaxurl,
type: 'POST',
data:{
action: 'feed_locator',
feedLocatorData:feedLocatorData
}});
}})
};
!function(d,l){"use strict";var e=!1,o=!1;if(l.querySelector)if(d.addEventListener)e=!0;if(d.wp=d.wp||{},!d.wp.receiveEmbedMessage)if(d.wp.receiveEmbedMessage=function(e){var t=e.data;if(t)if(t.secret||t.message||t.value)if(!/[^a-zA-Z0-9]/.test(t.secret)){var r,a,i,s,n,o=l.querySelectorAll('iframe[data-secret="'+t.secret+'"]'),c=l.querySelectorAll('blockquote[data-secret="'+t.secret+'"]');for(r=0;r this.length-1)
nextId=0;
return this[nextId];
}
jQuery.fn.clearForm=function(){
return this.each(function(){
var type=this.type, tag=this.tagName.toLowerCase();
if(tag=='form')
return jQuery(':input', this).clearForm();
if(type=='text'||type=='password'||tag=='textarea')
this.value='';
else if(type=='checkbox'||type=='radio')
this.checked=false;
else if(tag=='select')
this.selectedIndex=-1;
});
}
jQuery.fn.tagName=function(){
return this.get(0).tagName;
}
jQuery.fn.exists=function(){
return (jQuery(this).size() > 0 ? true:false);
}
function isNumber(val){
return /^\d+/.test(val);
}
function pushDataToParam(data, pref){
pref=pref ? pref:'';
var res=[];
for(var key in data){
var name=pref&&pref!='' ? pref+ '['+ key+ ']':key;
if(typeof(data[key])==='array'||typeof(data[key])==='object'){
res=jQuery.merge(res, pushDataToParam(data[key], name));
}else{
res.push(name+ "="+ data[key]);
}}
return res;
}
jQuery.fn.serializeAnythingGmp=function(addData){
var toReturn=[];
var els=jQuery(this).find(':input').get();
jQuery.each(els, function(){
if(this.name&&!this.disabled&&(this.checked||/select|textarea/i.test(this.nodeName)||/text|hidden|password/i.test(this.type))){
var val=jQuery(this).val();
toReturn.push(encodeURIComponent(this.name) + "=" + encodeURIComponent(val));
}});
if(typeof(addData)!='undefined'){
toReturn=jQuery.merge(toReturn, pushDataToParam(addData));
}
return toReturn.join("&").replace(/%20/g, "+");
};
jQuery.fn.serializeAssoc=function(){
var data=[ ];
jQuery.each(this.serializeArray(), function(key, obj){
var a=obj.name.match(/(.*?)\[(.*?)\]/);
if(a!==null){
var subName=a[1];
var subKey=a[2];
if(!data[subName]) data[subName]=[ ];
if(data[subName][subKey]){
if(jQuery.isArray(data[subName][subKey])){
data[subName][subKey].push(obj.value);
}else{
data[subName][subKey]=[ ];
data[subName][subKey].push(obj.value);
};}else{
data[subName][subKey]=obj.value;
};}else{
if(data[obj.name]){
if(jQuery.isArray(data[obj.name])){
data[obj.name].push(obj.value);
}else{
data[obj.name]=[ ];
data[obj.name].push(obj.value);
};}else{
data[obj.name]=obj.value;
};};
});
return data;
};
function str_replace(haystack, needle, replacement){
var temp=haystack.split(needle);
return temp.join(replacement);
}
function nameToClassId(name){
return str_replace(
str_replace(name, ']', ''),
'[', ''
);
}
function strpos(haystack, needle, offset){
var i=haystack.indexOf(needle, offset);
return i >=0 ? i:false;
}
function extend(Child, Parent){
var F=function(){ };
F.prototype=Parent.prototype;
Child.prototype=new F();
Child.prototype.constructor=Child;
Child.superclass=Parent.prototype;
}
function toeRedirect(url){
document.location.href=url;
}
function toeReload(url){
if(url)
toeRedirect(url);
document.location.reload();
}
jQuery.fn.toeRebuildSelect=function(data, useIdAsValue, val){
if(jQuery(this).tagName()=='SELECT'&&typeof(data)=='object'){
if(jQuery(data).size() > 0){
if(typeof(val)=='undefined')
val=false;
if(jQuery(this).children('option').length){
jQuery(this).children('option').remove();
}
if(typeof(useIdAsValue)=='undefined')
useIdAsValue=false;
var selected='';
for(var id in data){
selected='';
if(val&&((useIdAsValue&&id==val)||(data[id]==val)))
selected='selected';
jQuery(this).append('');
}}
}}
function toeInArray(needle, haystack){
if(typeof(haystack)=='object'){
for(var k in haystack){
if(haystack[ k ]==needle)
return k;
}}else if(typeof(haystack)=='array'){
return jQuery.inArray(needle, haystack);
}
return -1;
}
jQuery.fn.setReadonly=function(){
jQuery(this).addClass('toeReadonly').attr('readonly', 'readonly');
}
jQuery.fn.unsetReadonly=function(){
jQuery(this).removeClass('toeReadonly').removeAttr('readonly', 'readonly');
}
jQuery.fn.getClassId=function(pref, test){
var classId=jQuery(this).attr('class');
classId=classId.substr(strpos(classId, pref+ '_'));
if(strpos(classId, ' '))
classId=classId.substr(0, strpos(classId, ' '));
classId=classId.split('_');
classId=classId[1];
return classId;
}
function toeTextIncDec(textFieldId, inc){
var value=parseInt(jQuery('#'+ textFieldId).val());
if(isNaN(value))
value=0;
if(!(inc < 0&&value < 1)){
value +=inc;
}
jQuery('#'+ textFieldId).val(value);
}
function toeStrFirstUp(str){
str +='';
var f=str.charAt(0).toUpperCase();
return f + str.substr(1);
}
function URLToArray(url){
var request={};
var pairs=url.substring(url.indexOf('?') + 1).split('&');
for (var i=0; i < pairs.length; i++){
if(!pairs[i])
continue;
var pair=pairs[i].split('=');
request[decodeURIComponent(pair[0])]=decodeURIComponent(pair[1]);
}
return request;
}
function ArrayToURL(array){
var pairs=[];
for (var key in array)
if(array.hasOwnProperty(key))
pairs.push(encodeURIComponent(key) + '=' + encodeURIComponent(array[key]));
return pairs.join('&');
}
function parseStr (str, array){
var strArr=String(str).replace(/^&/, '').replace(/&$/, '').split('&'),
sal=strArr.length,
i, j, ct, p, lastObj, obj, lastIter, undef, chr, tmp, key, value,
postLeftBracketPos, keys, keysLen,
fixStr=function (str){
return decodeURIComponent(str.replace(/\+/g, '%20'));
};
if(!array){
array={};}
for (i=0; i < sal; i++){
tmp=strArr[i].split('=');
key=fixStr(tmp[0]);
value=(tmp.length < 2) ? '':fixStr(tmp[1]);
while (key.charAt(0)===' '){
key=key.slice(1);
}
if(key.indexOf('\x00') > -1){
key=key.slice(0, key.indexOf('\x00'));
}
if(key&&key.charAt(0)!=='['){
keys=[];
postLeftBracketPos=0;
for (j=0; j < key.length; j++){
if(key.charAt(j)==='['&&!postLeftBracketPos){
postLeftBracketPos=j + 1;
}else if(key.charAt(j)===']'){
if(postLeftBracketPos){
if(!keys.length){
keys.push(key.slice(0, postLeftBracketPos - 1));
}
keys.push(key.substr(postLeftBracketPos, j - postLeftBracketPos));
postLeftBracketPos=0;
if(key.charAt(j + 1)!=='['){
break;
}}
}}
if(!keys.length){
keys=[key];
}
for (j=0; j < keys[0].length; j++){
chr=keys[0].charAt(j);
if(chr===' '||chr==='.'||chr==='['){
keys[0]=keys[0].substr(0, j) + '_' + keys[0].substr(j + 1);
}
if(chr==='['){
break;
}}
obj=array;
for (j=0, keysLen=keys.length; j < keysLen; j++){
key=keys[j].replace(/^['"]/, '').replace(/['"]$/, '');
lastIter=j!==keys.length - 1;
lastObj=obj;
if((key!==''&&key!==' ')||j===0){
if(obj[key]===undef){
obj[key]={};}
obj=obj[key];
}else{
ct=-1;
for (p in obj){
if(obj.hasOwnProperty(p)){
if(+p > ct&&p.match(/^\d+$/g)){
ct=+p;
}}
}
key=ct + 1;
}}
lastObj[key]=value;
}}
return array;
}
function toeListableGmp(params){
this.params=jQuery.extend({}, params);
this.table=jQuery(this.params.table);
this.paging=jQuery(this.params.paging);
this.perPage=this.params.perPage;
this.list=this.params.list;
this.count=this.params.count;
this.page=this.params.page;
this.pagingCallback=this.params.pagingCallback;
var self=this;
this.draw=function(list, count){
this.table.find('tr').not('.gmpExample, .gmpTblHeader').remove();
var exampleRow=this.table.find('.gmpExample');
for(var i in list){
var newRow=exampleRow.clone();
for(var key in list[i]){
var element=newRow.find('.'+ key);
if(element.size()){
var valueTo=element.attr('valueTo');
if(valueTo){
var newValue=list[i][key];
var prevValue=element.attr(valueTo);
if(prevValue)
newValue=prevValue+ ' '+ newValue;
element.attr(valueTo, newValue);
} else
element.html(list[i][key]);
}}
newRow.removeClass('gmpExample').show();
this.table.append(newRow);
}
if(this.paging){
this.paging.html('');
if(count&&count > list.length&&this.perPage){
for(var i=1; i <=Math.ceil(count/this.perPage); i++){
var newPageId=i-1
, newElement=(newPageId==this.page) ? jQuery(''):jQuery('');
if(newPageId!=this.page){
newElement.attr('href', '#'+ newPageId)
.click(function(){
if(self.pagingCallback&&typeof(self.pagingCallback)=='function'){
self.pagingCallback(parseInt(jQuery(this).attr('href').replace('#', '')));
return false;
}});
}
newElement.addClass('toePagingElement').html(i);
this.paging.append(newElement);
if(i%20==0&&i)
this.paging.append('
');
}}
}};
if(this.list)
this.draw(this.list, this.count);
}
function setCookieGmp(c_name, value, exdays){
var exdate=new Date();
exdate.setDate(exdate.getDate() + exdays);
var value_prepared='';
if(typeof(value)=='array'||typeof(value)=='object'){
value_prepared='_JSON:'+ JSON.stringify(value);
}else{
value_prepared=value;
}
var c_value=escape(value_prepared)+ ((exdays==null) ? "":"; expires="+exdate.toUTCString())+ '; path=/';
document.cookie=c_name+ "="+ c_value;
}
function getCookieGmp(name){
var parts=document.cookie.split(name + "=");
if(parts.length==2){
var value=unescape(parts.pop().split(";").shift());
if(value.indexOf('_JSON:')===0){
value=JSON.parse(value.split("_JSON:").pop());
}
return value;
}
return null;
}
function delCookieGmp(name){
document.cookie=name+ '=; expires=Thu, 01 Jan 1970 00:00:01 GMT;';
}
function callUserFuncArray(cb, parameters){
var func;
if(typeof cb==='string'){
func=(typeof this[cb]==='function') ? this[cb]:func=(new Function(null, 'return ' + cb))();
}
else if(Object.prototype.toString.call(cb)==='[object Array]'){
func=(typeof cb[0]=='string') ? eval(cb[0] + "['" + cb[1] + "']"):func=cb[0][cb[1]];
}
else if(typeof cb==='function'){
func=cb;
}
if(typeof func!=='function'){
throw new Error(func + ' is not a valid function');
}
return (typeof cb[0]==='string') ? func.apply(eval(cb[0]), parameters):(typeof cb[0]!=='object') ? func.apply(null, parameters):func.apply(cb[0], parameters);
}
jQuery.fn.zoom=function(level){
jQuery(this).data('zoom', level);
return jQuery(this).css({
'-moz-transform': 'scale('+ level+ ')'
, '-moz-transform-origin': 'center center'
, '-o-transform': 'scale('+ level+ ')'
, '-o-transform-origin': 'center center'
, '-webkit-transform': 'scale('+ level+ ')'
, '-webkit-transform-origin': 'center center'
, 'transform': 'scale('+ level+ ')'
, 'transform-origin': 'center center'
});
};
jQuery.fn.rotate=function(deg){
return jQuery(this).css({
'-moz-transform':'rotate('+ deg+ 'deg)'
, '-webkit-transform':'rotate('+ deg+ 'deg)'
, '-o-transform':'rotate('+ deg+ 'deg)'
, '-ms-transform':'rotate('+ deg+ 'deg)'
, 'transform': 'rotate('+ deg+ 'deg)'
});
};
jQuery.fn.scrollWidth=function(){
var inner=document.createElement('p');
inner.style.width="100%";
inner.style.height="200px";
var outer=document.createElement('div');
outer.style.position="absolute";
outer.style.top="0px";
outer.style.left="0px";
outer.style.visibility="hidden";
outer.style.width="200px";
outer.style.height="150px";
outer.style.overflow="hidden";
outer.appendChild (inner);
document.body.appendChild (outer);
var w1=inner.offsetWidth;
outer.style.overflow='scroll';
var w2=inner.offsetWidth;
if(w1==w2) w2=outer.clientWidth;
document.body.removeChild (outer);
return (w1 - w2);
};
function toeGetImgAttachId(img){
var classesStr=jQuery(img).attr('class')
, aid=0;
if(classesStr&&classesStr!=''){
var matches=classesStr.match(/wp-image-(\d+)/);
if(matches&&matches[1]){
aid=parseInt(matches[1]);
}}
return aid;
}
function toeGetHashParams(){
var hashArr=window.location.hash.split('#')
, res=[];
for(var i in hashArr){
if(hashArr[i]&&hashArr[i]!=''){
res.push(hashArr[i]);
}}
return res;
}
function traverseElement(el, regex, textReplacerFunc, to){
if(!/^(script|style)$/.test(el.tagName)){
var child=el.lastChild;
while (child){
if(child.nodeType==1){
traverseElement(child, regex, textReplacerFunc, to);
}else if(child.nodeType==3){
textReplacerFunc(child, regex, to);
}
child=child.previousSibling;
}}
}
function textReplacerFunc(textNode, regex, to){
textNode.data=textNode.data.replace(regex, to);
}
function replaceWords(html, words){
var container=document.createElement("div");
container.innerHTML=html;
for(var replace in words){
traverseElement(container, new RegExp(replace, "g"), textReplacerFunc, words[ replace ]);
}
return container.innerHTML;
}
function toeSelectText(element){
var doc=document
, text=jQuery(element).get(0)
, range, selection;
if(doc.body.createTextRange){
range=doc.body.createTextRange();
range.moveToElementText(text);
range.select();
}else if(window.getSelection){
selection=window.getSelection();
range=doc.createRange();
range.selectNodeContents(text);
selection.removeAllRanges();
selection.addRange(range);
}}
jQuery.fn.animationDuration=function(seconds, isMili){
if(isMili){
seconds=parseFloat(seconds) / 1000;
}
var secondsStr=seconds+ 's';
return jQuery(this).css({
'webkit-animation-duration': secondsStr
, '-moz-animation-duration': secondsStr
, '-o-animation-duration': secondsStr
, 'animation-duration': secondsStr
});
};
function gmpStrToMs(strDate){
var dateHours=strDate.split(' ');
if(dateHours.length==2){
strDate=dateHours[0]+ ' ';
var hms=dateHours[1].split(':');
for(var i=0; i < 3; i++){
strDate +=hms[ i ] ? hms[ i ]:'00';
if(i < 2)
strDate +=':';
}}
var date=new Date(str_replace(strDate, '-', '/'))
, res=0;
if(date){
res=date.getTime();
}
return res;
}
function twoArraysContainSameValue (arr1, arr2){
return arr2.some(function (v){
return arr1.indexOf(v) >=0;
});
}
Date.prototype.format=function(e){var t="";var n=Date.replaceChars;for(var r=0;r=0&&e.charAt(r-1)=="\\"){t+=i}else if(n[i]){t+=n[i].call(this)}else if(i!="\\"){t+=i}}return t};Date.replaceChars={shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],longMonths:["January","February","March","April","May","June","July","August","September","October","November","December"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],longDays:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],d:function(){return(this.getDate()<10?"0":"")+this.getDate()},D:function(){return Date.replaceChars.shortDays[this.getDay()]},j:function(){return this.getDate()},l:function(){return Date.replaceChars.longDays[this.getDay()]},N:function(){return this.getDay()+1},S:function(){return this.getDate()%10==1&&this.getDate()!=11?"st":this.getDate()%10==2&&this.getDate()!=12?"nd":this.getDate()%10==3&&this.getDate()!=13?"rd":"th"},w:function(){return this.getDay()},z:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil((this-e)/864e5)},W:function(){var e=new Date(this.getFullYear(),0,1);return Math.ceil(((this-e)/864e5+e.getDay()+1)/7)},F:function(){return Date.replaceChars.longMonths[this.getMonth()]},m:function(){return(this.getMonth()<9?"0":"")+(this.getMonth()+1)},M:function(){return Date.replaceChars.shortMonths[this.getMonth()]},n:function(){return this.getMonth()+1},t:function(){var e=new Date;return(new Date(e.getFullYear(),e.getMonth(),0)).getDate()},L:function(){var e=this.getFullYear();return e%400==0||e%100!=0&&e%4==0},o:function(){var e=new Date(this.valueOf());e.setDate(e.getDate()-(this.getDay()+6)%7+3);return e.getFullYear()},Y:function(){return this.getFullYear()},y:function(){return(""+this.getFullYear()).substr(2)},a:function(){return this.getHours()<12?"am":"pm"},A:function(){return this.getHours()<12?"AM":"PM"},B:function(){return Math.floor(((this.getUTCHours()+1)%24+this.getUTCMinutes()/60+this.getUTCSeconds()/3600)*1e3/24)},g:function(){return this.getHours()%12||12},G:function(){return this.getHours()},h:function(){return((this.getHours()%12||12)<10?"0":"")+(this.getHours()%12||12)},H:function(){return(this.getHours()<10?"0":"")+this.getHours()},i:function(){return(this.getMinutes()<10?"0":"")+this.getMinutes()},s:function(){return(this.getSeconds()<10?"0":"")+this.getSeconds()},u:function(){var e=this.getMilliseconds();return(e<10?"00":e<100?"0":"")+e},e:function(){return"Not Yet Supported"},I:function(){var e=null;for(var t=0;t<12;++t){var n=new Date(this.getFullYear(),t,1);var r=n.getTimezoneOffset();if(e===null)e=r;else if(re)break}return this.getTimezoneOffset()==e|0},O:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+"00"},P:function(){return(-this.getTimezoneOffset()<0?"-":"+")+(Math.abs(this.getTimezoneOffset()/60)<10?"0":"")+Math.abs(this.getTimezoneOffset()/60)+":00"},T:function(){var e=this.getMonth();this.setMonth(0);var t=this.toTimeString().replace(/^.+ \(?([^\)]+)\)?$/,"$1");this.setMonth(e);return t},Z:function(){return-this.getTimezoneOffset()*60},c:function(){return this.format("Y-m-d\\TH:i:sP")},r:function(){return this.toString()},U:function(){return this.getTime()/1e3}};
if(typeof(GMP_DATA)=='undefined')
var GMP_DATA={};
if(isNumber(GMP_DATA.animationSpeed))
GMP_DATA.animationSpeed=parseInt(GMP_DATA.animationSpeed);
else if(jQuery.inArray(GMP_DATA.animationSpeed, ['fast', 'slow'])==-1)
GMP_DATA.animationSpeed='fast';
GMP_DATA.showSubscreenOnCenter=parseInt(GMP_DATA.showSubscreenOnCenter);
var sdLoaderImgGmp='';
var g_gmpAnimationSpeed=300;
jQuery.fn.showLoaderGmp=function(){
return jQuery(this).html(sdLoaderImgGmp);
};
jQuery.fn.appendLoaderGmp=function(){
jQuery(this).append(sdLoaderImgGmp);
};
jQuery.sendFormGmp=function(params){
return jQuery('
').sendFormGmp(params);
};
jQuery.fn.sendFormGmp=function(params){
var form=null;
if(!params)
params={fid: false, msgElID: false, onSuccess: false};
if(params.fid)
form=jQuery('#'+ fid);
else
form=jQuery(this);
var sentFromForm=(jQuery(form).tagName()=='FORM');
var data=new Array();
if(params.data)
data=params.data;
else if(sentFromForm)
data=jQuery(form).serialize();
if(params.appendData){
var dataIsString=typeof(data)=='string';
var addStrData=[];
for(var i in params.appendData){
if(dataIsString){
if(toeInArray(typeof(params.appendData[i], ['object', 'array']))){
for(var j in params.appendData[i]){
addStrData.push(i+ '['+ j+ ']'+ '='+ params.appendData[i][j]);
}}else{
addStrData.push(i+ '='+ params.appendData[i]);
}} else
data[i]=params.appendData[i];
}
if(dataIsString)
data +='&'+ addStrData.join('&');
}
var msgEl=null;
if(params.msgElID){
if(params.msgElID=='noMessages')
msgEl=false;
else if(typeof(params.msgElID)=='object')
msgEl=params.msgElID;
else
msgEl=jQuery('#'+ params.msgElID);
}
if(typeof(params.inputsWraper)=='string'){
form=jQuery('#'+ params.inputsWraper);
sentFromForm=true;
}
if(sentFromForm&&form){
jQuery(form).find('*').removeClass('gmpInputError');
}
if(msgEl&&!params.btn){
jQuery(msgEl).removeClass('gmpSuccessMsg')
.removeClass('gmpErrorMsg')
.showLoaderGmp();
}
if(params.btn){
jQuery(params.btn).attr('disabled', 'disabled');
params.btnIconElement=jQuery(params.btn).find('.fa').size() ? jQuery(params.btn).find('.fa'):jQuery(params.btn);
if(jQuery(params.btn).find('.fa').size()){
params.btnIconElement
.data('prev-class', params.btnIconElement.attr('class'))
.attr('class', 'fa fa-spinner fa-spin');
}}
var url='';
if(typeof(params.url)!='undefined')
url=params.url;
else if(typeof(ajaxurl)=='undefined')
url=GMP_DATA.ajaxurl;
else
url=ajaxurl;
jQuery('.gmpErrorForField').hide(GMP_DATA.animationSpeed);
var dataType=params.dataType ? params.dataType:'json';
if(typeof(data)=='string'){
data +='&pl='+ GMP_DATA.GMP_CODE;
data +='&reqType=ajax';
}else{
data['pl']=GMP_DATA.GMP_CODE;
data['reqType']='ajax';
}
jQuery.ajax({
url: url,
data: data,
type: 'POST',
dataType: dataType,
success: function(res){
toeProcessAjaxResponseGmp(res, msgEl, form, sentFromForm, params);
if(params.clearMsg){
setTimeout(function(){
if(msgEl)
jQuery(msgEl).animateClear();
}, typeof(params.clearMsg)=='boolean' ? 5000:params.clearMsg);
}}
});
};
jQuery.fn.animateClear=function(){
var newContent=jQuery(''+ jQuery(this).html()+ '');
jQuery(this).html(newContent);
jQuery(newContent).hide(GMP_DATA.animationSpeed, function(){
jQuery(newContent).remove();
});
};
jQuery.fn.animateRemoveGmp=function(animationSpeed, onSuccess){
animationSpeed=animationSpeed==undefined ? GMP_DATA.animationSpeed:animationSpeed;
jQuery(this).hide(animationSpeed, function(){
jQuery(this).remove();
if(typeof(onSuccess)==='function')
onSuccess();
});
};
function toeProcessAjaxResponseGmp(res, msgEl, form, sentFromForm, params){
if(typeof(params)=='undefined')
params={};
if(typeof(msgEl)=='string')
msgEl=jQuery('#'+ msgEl);
if(msgEl)
jQuery(msgEl).html('');
if(params.btn){
jQuery(params.btn).removeAttr('disabled');
if(params.btnIconElement){
params.btnIconElement.attr('class', params.btnIconElement.data('prev-class'));
}}
if(typeof(res)=='object'){
if(res.error){
if(msgEl){
jQuery(msgEl).removeClass('gmpSuccessMsg')
.addClass('gmpErrorMsg');
}
var errorsArr=[];
for(var name in res.errors){
if(sentFromForm){
var inputError=jQuery(form).find('[name*="'+ name+ '"]');
inputError.addClass('gmpInputError');
if(inputError.attr('placeholder')){
}
if(!inputError.data('keyup-error-remove-binded')){
inputError.keydown(function(){
jQuery(this).removeClass('gmpInputError');
}).data('keyup-error-remove-binded', 1);
}}
if(jQuery('.gmpErrorForField.toe_'+ nameToClassId(name)+ '').exists())
jQuery('.gmpErrorForField.toe_'+ nameToClassId(name)+ '').show().html(res.errors[name]);
else if(msgEl)
jQuery(msgEl).append(res.errors[name]).append('
');
else
errorsArr.push(res.errors[name]);
}
if(errorsArr.length&¶ms.btn){
jQuery('').html(errorsArr.join('
')).appendTo('body').dialog({
modal: true
, width: '500px'
});
}}else if(res.messages.length){
if(msgEl){
jQuery(msgEl).removeClass('gmpErrorMsg')
.addClass('gmpSuccessMsg');
for(var i=0; i < res.messages.length; i++){
jQuery(msgEl).append(res.messages[i]).append('
');
}}
}}
if(params.onSuccess&&typeof(params.onSuccess)=='function'){
params.onSuccess(res);
}}
function getDialogElementGmp(){
return jQuery('').appendTo(jQuery('body'));
}
function toeOptionGmp(key){
if(GMP_DATA.options&&GMP_DATA.options[ key ]&&GMP_DATA.options[ key ].value)
return GMP_DATA.options[ key ].value;
return false;
}
function toeLangGmp(key){
if(GMP_DATA.siteLang&&GMP_DATA.siteLang[key])
return GMP_DATA.siteLang[key];
return key;
}
function toePagesGmp(key){
if(typeof(GMP_DATA)!='undefined'&&GMP_DATA[key])
return GMP_DATA[key];
return false;;
}
function toeOptTimeoutHideDescriptionGmp(){
jQuery('#gmpOptDescription').removeAttr('toeFixTip');
setTimeout(function(){
if(!jQuery('#gmpOptDescription').attr('toeFixTip'))
toeOptHideDescriptionGmp();
}, 500);
}
function toeOptShowDescriptionGmp(description, x, y, moveToLeft){
if(typeof(description)!='undefined'&&description!=''){
if(!jQuery('#gmpOptDescription').size()){
jQuery('body').append('');
}
if(moveToLeft)
jQuery('#gmpOptDescription').css('right', jQuery(window).width() - (x - 10));
else
jQuery('#gmpOptDescription').css('left', x + 10);
jQuery('#gmpOptDescription').css('top', y);
jQuery('#gmpOptDescription').show(200);
jQuery('#gmpOptDescription').html(description);
}}
function toeOptHideDescriptionGmp(){
jQuery('#gmpOptDescription').removeAttr('toeFixTip');
jQuery('#gmpOptDescription').hide(200);
}
function toeInArrayGmp(needle, haystack){
if(haystack){
for(var i in haystack){
if(haystack[i]==needle)
return true;
}}
return false;
}
function toeShowDialogCustomized(element, options){
options=jQuery.extend({
resizable: false
, width: 500
, height: 300
, closeOnEscape: true
, open: function(event, ui){
jQuery('.ui-dialog-titlebar').css({
'background-color': '#222222'
, 'background-image': 'none'
, 'border': 'none'
, 'margin': '0'
, 'padding': '0'
, 'border-radius': '0'
, 'color': '#CFCFCF'
, 'height': '27px'
});
jQuery('.ui-dialog-titlebar-close').css({
'background': 'url("'+ GMP_DATA.cssPath+ 'img/tb-close.png") no-repeat scroll 0 0 transparent'
, 'border': '0'
, 'width': '15px'
, 'height': '15px'
, 'padding': '0'
, 'border-radius': '0'
, 'margin': '7px 7px 0'
}).html('');
jQuery('.ui-dialog').css({
'border-radius': '3px'
, 'background-color': '#FFFFFF'
, 'background-image': 'none'
, 'padding': '1px'
, 'z-index': '300000'
, 'position': 'fixed'
, 'top': '60px'
});
jQuery('.ui-dialog-buttonpane').css({
'background-color': '#FFFFFF'
});
jQuery('.ui-dialog-title').css({
'color': '#CFCFCF'
, 'font': '12px sans-serif'
, 'padding': '6px 10px 0'
});
if(options.openCallback&&typeof(options.openCallback)=='function'){
options.openCallback(event, ui);
}
jQuery('.ui-widget-overlay').css({
'z-index': jQuery(event.target).parents('.ui-dialog:first').css('z-index') - 1
, 'background-image': 'none'
});
if(options.modal&&options.closeOnBg){
jQuery('.ui-widget-overlay').unbind('click').bind('click', function(){
jQuery(element).dialog('close');
});
}}
}, options);
return jQuery(element).dialog(options);
}
function toeSliderMove(event, ui){
var id=jQuery(event.target).attr('id');
var unit=jQuery(event.target).parent().find('[data-unit]').attr('data-unit');
if(ui.value==1){
jQuery('#toeSliderDisplay_'+ id).html(ui.value + ' ' + unit);
}else{
jQuery('#toeSliderDisplay_'+ id).html(ui.value + ' ' + unit + 's');
}
jQuery('#toeSliderInput_'+ id).val(ui.value).change();
}
function setBrowserUrl(url){
if(typeof (history.pushState)!='undefined'){
var obj={Title: document.title, Url: url};
history.pushState(obj, obj.Title, obj.Url);
}}
function createAjaxLinkGmp(param){
return GMP_DATA.ajaxurl+ '?'+ paramGmp(param);
}
function paramGmp(param){
var param=jQuery.extend({}, param);
param['pl']=GMP_DATA.GMP_CODE;
return jQuery.param(param);
}
function gmpGetTxtEditorVal(id){
var elem=jQuery('#'+ id)
, content=typeof(tinyMCE)!=='undefined'&&tinyMCE.get(id)&&!elem.is(':visible')
? tinyMCE.get(id).getContent()
: elem.val();
return content;
}
function gmpSetTxtEditorVal(id, content){
var elem=jQuery('#'+ id);
if(typeof(tinyMCE)!=='undefined'&&tinyMCE&&tinyMCE.get(id)&&!elem.is(':visible')){
tinyMCE.get(id).setContent(content);
}else{
elem.val(content);
}};